/*
 * Copyright (c) gitee.com/jiandong001.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */



import { JavaScriptExecutor, RuntimeConfig } from '../../react/bridge/JavaScriptExecutor'
//import { SoLoader } from '../../react/soloader/SoLoader'
import { HybridData } from '../../napi/HybridData'

export class HermesExecutor extends JavaScriptExecutor {
  private static mode: string;

  public static loadLibrary(): void | never {
    if (HermesExecutor.mode == null) {
//      SoLoader.loadLibrary("hermes");
      try {
//        SoLoader.loadLibrary("hermes-executor-debug");
        HermesExecutor.mode = "Debug";
      } catch (var1) {
//        SoLoader.loadLibrary("hermes-executor-release");
        HermesExecutor.mode = "Release";
      }
    }
  }

  constructor(config: RuntimeConfig, enableDebugger: boolean, debuggerName: string) {
    super(config == null ? HermesExecutor.initHybridDefaultConfig(enableDebugger, debuggerName) : HermesExecutor.initHybrid(enableDebugger, debuggerName, config.heapSizeMB));
  }

  public getName(): string {
    return "HermesExecutor" + HermesExecutor.mode;
  }

  //todo /*native */
  public static  canLoadFile(var0: string): boolean { return false };
  //todo /*native */
  private static initHybridDefaultConfig(var0: boolean, var1: string): HybridData { return new HybridData()}
  //todo /*native */
  private static initHybrid(var0: boolean, var1: string, var2: number): HybridData { return new HybridData()}
}
